﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework;
using Infrastructure.DataObjects;

namespace Domain.Module.Entities
{
    public partial class User
    {
        public override CommentType CommonType
        {
            get
            {
                return CommentType.User;
            }
        }

        public void PublishMBlog(MBlog mblog)
        {
            this.MBlogs.Add(mblog);
        }

        public static User CreateUser(UserObject userObject)
        {
            return new User
            {
                ID = userObject.ID,
                Name = userObject.Name
            };
        }

        public void Update(UserObject userObject)
        {
            Name = userObject.Name;
        }
    }
}
